﻿<Window x:Class="Resxus.View.MainWindowView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:view="clr-namespace:Resxus.View"
    xmlns:vmodel="clr-namespace:Resxus.ViewModel"    
    Title="{Binding DisplayName}"     
    MinHeight="600" MinWidth="800"         
    Height="600" Width="800" WindowStartupLocation="CenterScreen">  
    <Window.Resources>       
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../MainWindowResources.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <DataTemplate x:Key="MenubarTemplate" DataType="{x:Type vmodel:MenuBarVM}">
                <view:MenuBarView/>
            </DataTemplate>
            <DataTemplate x:Key="ToolbarTemplate" DataType="{x:Type vmodel:ToolBarVM}">
                <view:ToolBarView/>
            </DataTemplate>
            <DataTemplate x:Key="FileListTemplate" DataType="{x:Type vmodel:FileListVM}">
                <view:FileListView/>
            </DataTemplate>
        </ResourceDictionary>        
    </Window.Resources>
    <Grid>
        <DockPanel>
            <ContentControl 
                x:Name="MenuBar"    
                Content="{Binding MenuPanel}"
                ContentTemplate="{StaticResource MenubarTemplate}"
                DockPanel.Dock="Top"/>
            <ContentControl 
                x:Name="ToolBar"             
                Content="{Binding ToolPanel}"
                ContentTemplate="{StaticResource ToolbarTemplate}"
                DockPanel.Dock="Top"/>
            <Grid
                Background="WhiteSmoke"
                >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MaxWidth="360" MinWidth="150" Width="320"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <HeaderedContentControl                 
                    x:Name="FileList"                                          
                    Grid.Column="0"     
                    Content="{Binding LeftPanel}"
                    ContentTemplate="{StaticResource FileListTemplate}"
                    Style="{StaticResource MainHCCStyle}"
                    Header="Files"                    
                    />                    
                <GridSplitter   
                    Background="DimGray"
                    Grid.Column="0"
                    Width="2"
                    />
                <HeaderedContentControl
                    Grid.Column="1"
                    x:Name="ResEdit"   
                    Header="Resources"
                    Content="{Binding Workspaces}"
                    ContentTemplate="{StaticResource WorkspacesTemplate}"
                    Style="{StaticResource MainHCCStyle}"
                    />                
            </Grid>                
        </DockPanel>
    </Grid>
</Window>
